## Data prep -------

# Take the name of a country and return a data summary.
prep_country_data <- function(country){
  
  if(country == "ALL"){
    df_country <- df_bal %>% arrange(i,period)
  } else {
    df_country <- df_bal %>% 
      filter(rb020 == country) %>% arrange(i,period)
  }

  ## Summary
  print(skim(df_country %>% mutate(health = factor(health))))
  return(df_country)
}
